// =后面是一个表达式上下文{}，外界访问不到对象里面属性
let along = {
    name: 'along',
    age: 20,
    sex: 'male',
    // 方法
    teach(){
        console.log(this.name+'教书')
    }
}
along.teach()
along.sing=function (){
    console.log(this.name+'is sing')
}
along.sing1=()=>{
    console.log(this)
}
along.sing()
along.sing1()
// []加引号代表一个属性字符串，不带引号是一个变量
console.log(along['name'])

console.log(along.a)

console.log(Array instanceof Object)


let num=10
console.log(typeof num) //number
num.index=10 //number
console.log(num.index) //undefined


let num1=new Number(10)
console.log(typeof num1) //object
num1.index=100
console.log(num1.index) //100

console.log('----------------------------')
// 值传递
let a=100
let b=a
a=200
console.log(a,b)
// 传的是堆地址。
let along1=along
along.name='aaa'
console.log(along1.name)